import Layout from '@/views/CommonLayout.vue';
import { h, resolveComponent } from 'vue';

const system = {
  path: '/system',
  component: Layout,
  meta: {
    requiresAuth: true,
  },
  children: [
    {
      path: '/system/department',
      component: {
        render() {
          return h(resolveComponent('router-view'));
        },
      },
      children: [
        {
          path: '',
          component: () =>
            import('@/views/System/SystemDepartment/SystemDepartmentIndex.vue'),
        },
      ],
    },
    {
      path: '/system/role',
      component: {
        render() {
          return h(resolveComponent('router-view'));
        },
      },
      children: [
        {
          path: '',
          component: () =>
            import('@/views/System/SystemRole/SystemRoleIndex.vue'),
        },
      ],
    },
    {
      path: '/system/user',
      component: {
        render() {
          return h(resolveComponent('router-view'));
        },
      },
      children: [
        {
          path: '',
          component: () =>
            import('@/views/System/SystemUser/SystemUserIndex.vue'),
        },
      ],
    },
  ],
};

export { system };
